﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BGM_Project_Work_Plan.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.Form.BGM_Project_Work_Plan" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <title><asp:Literal runat="Server" id="litTitle"/></title>
</head>
<body>
    <form id="form1" runat="server">
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css">
    
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>  
    
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None"  > 
        </telerik:RadAjaxLoadingPanel>
        
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnAddControl_t5">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelFlexibleControl_t5" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rdShowAll">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gridExpense" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="rdShowSelected" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>    

        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">

                function isNumberKey(event) 
                {
                 var charCode = (event.which) ? event.which : event.keyCode
                 if(charCode > 31 && (charCode < 48 || charCode > 57)){
                     return false;
                  }
                 return true;
                }

                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                } 

        </script>
    </telerik:RadCodeBlock>
    
    <div class="bigModuleFull900">
        <div class="bigModuleBottom900">
            <div class="defaultFont">
                <asp:Panel ID="panel9" runat="server" Width="840px" Height="390px" ScrollBars="Auto">
                <table cellpadding="0" cellspacing="0" style="width: 98%;font-family: 'Segoe UI'; font-size: 13px">
                    <tr valign="top">
                        <td align="center">
                            <table width="95%">
                                <tr>
                                    <td align="left" valign="top" bgcolor="#7DA5E0" 
                                        style="padding: 5px; color: #FFFFFF; font-weight: bold;font-family: 'Segoe UI'; font-size: 13px">
                                        ตารางแสดงข้อมูลแผนการปฏิบัติงาน
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="center">
                            <asp:Panel ID="panelGrid_t5" runat="server">
                                <asp:Label ID="lbProjSeq" runat="server" Visible="False"></asp:Label>
                                <br />
                                <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="Grid_t5" runat="server" AllowMultiRowSelection="True" 
                                    AllowPaging="True" AutoGenerateColumns="False" GridLines="None" 
                                    MasterTableView-GridLines="None" OnItemCommand="Grid_t5_ItemCommand" 
                                    onitemdatabound="Grid_t5_ItemDataBound" Width="770px" 
                                    onitemcreated="Grid_t5_ItemCreated">
                                    <mastertableview commanditemdisplay="Top" datakeynames="Sequence" grouploadmode="Client" width="100%">
                                    <commanditemtemplate>
                                        <table style="height: 30px;">
                                            <tr>
                                                <td align="right">
                                                    <asp:LinkButton ID="AddNew_t5" runat="server" CommandName="TargetInsertClick" CssClass="LinkButton"> 
                                                        <img alt="" src="../Image/Grid/AddRecord.gif" style="border:0px;vertical-align:middle;" />&#160;&#160;เพิ่มข้อมูลใหม่ </asp:LinkButton>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="Delete_t5" runat="server" CommandName="Delete" CssClass="LinkButton" OnClientClick="javascript:return confirm('ยืนยันการลบข้อมูลที่เลือก')"><img 
                                                        alt="" src="../Image/Grid/Delete.gif" style="border:0px;vertical-align:middle;" />&#160;&#160;ลบข้อมูล</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </commanditemtemplate>
                                    <rowindicatorcolumn>
                                        <HeaderStyle Width="20px" /></rowindicatorcolumn>
                                        <expandcollapsecolumn commandname="ExpandCollapseColumn" visible="True">
                                    </expandcollapsecolumn>
                                    <nestedviewtemplate>
                                    <asp:Panel ID="PanelNested_t5" runat="server" BackColor="#FFFFCC" Width="100%">
                                    <br />
                                    <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="GridIn_t5" runat="server" AllowMultiRowSelection="True" AllowPaging="True" AutoGenerateColumns="False" 
                                        GridLines="None" MasterTableView-GridLines="None" OnItemCommand="GridIn_t5_ItemCommand" Width="100%" OnItemDataBound="GridIn_t5_ItemDataBound">
                                    <mastertableview cellspacing="-1" commanditemdisplay="Top" DataKeyNames="Sequence" grouploadmode="Client" width="100%">
                                    <commanditemtemplate>
                                        <table>
                                            <tr>
                                                <td>
                                                    <asp:LinkButton ID="DeleteIn_t5" runat="server" CommandName="Delete" 
                                                        CssClass="LinkButton" OnClientClick="javascript:return confirm('ยืนยันการลบข้อมูลที่เลือก')"> 
                                                    <img alt="" src="../Image/Grid/Delete.gif" style="border:0px;vertical-align:middle;" />&#160;&#160;ลบข้อมูล</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </commanditemtemplate>
                                    <rowindicatorcolumn>
                                        <HeaderStyle Width="20px" />
                                    </rowindicatorcolumn>
                                    <expandcollapsecolumn>
                                        <HeaderStyle Width="20px" />
                                    </expandcollapsecolumn>
                                    <Columns>
                                        <telerik:GridClientSelectColumn HeaderStyle-HorizontalAlign="Center" 
                                            HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center" 
                                            UniqueName="ClientSelectColumn">
                                            <HeaderStyle HorizontalAlign="Center" 
                                            Width="30px" /><ItemStyle HorizontalAlign="Center" />
                                        </telerik:GridClientSelectColumn>
                                        <telerik:GridBoundColumn DataField="target" 
                                            HeaderStyle-HorizontalAlign="Center" HeaderText="เป้าหมาย" 
                                            ItemStyle-HorizontalAlign="Left" UniqueName="target" Visible="true">
                                            <HeaderStyle HorizontalAlign="Center" Width="400px" />
                                            <ItemStyle HorizontalAlign="Left" />
                                            </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="start_month" 
                                            HeaderStyle-HorizontalAlign="Center" HeaderText="เดือนเริ่มต้น" 
                                            ItemStyle-HorizontalAlign="Left" UniqueName="start_month" Visible="true">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" /></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="end_month" 
                                            HeaderStyle-HorizontalAlign="Center" HeaderText="เดือนสิ้นสุด" 
                                            ItemStyle-HorizontalAlign="Left" UniqueName="end_month" Visible="true">
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" />
                                         </telerik:GridBoundColumn>
                                    </Columns>                    
                                </mastertableview>
                                <clientsettings enablerowhoverstyle="true">
                                    <clientevents /><selecting allowrowselect="True" /></clientsettings>
                                <PagerStyle Mode="NextPrevAndNumeric" />
                            </telerik:RadGrid>
                            <br />
                        </asp:Panel>
                        </nestedviewtemplate>
                        <Columns>
                            <telerik:GridClientSelectColumn HeaderStyle-HorizontalAlign="Center" 
                                HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center" 
                                UniqueName="ClientSelectColumn">
                                <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridClientSelectColumn>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                                EditText="คลิกเพื่อแก้ไขข้อมูล">
                                <ItemStyle Width="15px" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="descr" HeaderStyle-HorizontalAlign="Center" 
                                HeaderStyle-Wrap="False" HeaderText="ขั้นตอนการดำเนินงาน" 
                                ItemStyle-HorizontalAlign="Left" UniqueName="descr" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month1" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month1" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month2" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month2" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month3" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month3" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month4" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month4" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month5" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month5" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month6" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month6" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month7" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month7" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month8" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month8" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month9" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month9" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month10" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month10" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month11" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month11" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="act_month12" 
                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" 
                                UniqueName="act_month12" Visible="true">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" />
                            </telerik:GridBoundColumn>
                            </Columns>
                        <editformsettings editformtype="Template">
                            <editcolumn uniquename="EditCommandColumn1"></editcolumn>
                        </editformsettings>
                    </mastertableview>
                    <clientsettings enablerowhoverstyle="true">
                        <clientevents /><selecting allowrowselect="True" /></clientsettings>
                    <PagerStyle Mode="NextPrevAndNumeric" />
                </telerik:RadGrid>
                                <asp:Label ID="lblMonthType_t5" runat="server" Visible="False"></asp:Label>
                                <asp:Label ID="lblSeq_t5" runat="server" Visible="False"></asp:Label>
                                <asp:Label ID="lblSeqIn_t5" runat="server" Visible="False"></asp:Label>
                                <asp:Label ID="lblItem_t5" runat="server" Visible="False">0</asp:Label>
                                <br />
                            </asp:Panel>
                        </td>
                    </tr>
                    <tr valign="top">
                        <td align="center">
                            <asp:Panel ID="PanelAddEdit_t5" runat="server" Visible="False">
                                <table width="95%" style="font-family: 'Segoe UI'; font-size: 13px">
                                    <tr valign="top">
                                        <td align="left" colspan="3" valign="top" bgcolor="#7DA5E0" 
                                            style="padding: 5px; color: #FFFFFF; font-weight: bold;font-family: 'Segoe UI'; font-size: 13px">
                                            ขั้นตอนที่ 1 : กำหนดขั้นตอนการดำเนินงาน
                                        </td>
                                    </tr>
                                    <tr style="padding-top: 5px;">
                                        <td align="right" style="padding-top: 5px; padding-bottom: 15px;" width="30%">
                                            <br />
                                            ขั้นตอนการดำเนินงาน :
                                        </td>                                   
                                        <td width="3%">
                                        </td>
                                        <td style="padding-top: 5px; padding-bottom: 15px;">
                                            <br />
                                            <telerik:RadTextBox ID="txtDescr_t5" runat="server" Width="80%"></telerik:RadTextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtDescr_t5" ErrorMessage="*" ValidationGroup="t5"> </asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    
                                    <tr valign="top">
                                        <td align="left" colspan="3" valign="top" bgcolor="#7DA5E0" 
                                            style="padding: 5px; color: #FFFFFF; font-weight: bold;font-family: 'Segoe UI'; font-size: 13px">
                                            ขั้นตอนที่ 2 : กำหนดช่วงเวลาดำเนินงาน
                                        </td>
                                    </tr>
                                    
                                    <tr valign="top">
                                        <td align="left" colspan="3">
                                            <br />
                                            <table width="80%" style="font-family: 'Segoe UI'; font-size: 13px">
                                                <tr>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth1" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth1" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth2" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth2" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth3" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth3" runat="server" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth4" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth4" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth5" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth5" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth6" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth6" runat="server" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth7" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth7" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth8" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth8" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px;">
                                                        <asp:Label ID="lblMonth9" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth9" runat="server" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="padding-top: 5px; padding-bottom: 15px;">
                                                        <asp:Label ID="lblMonth10" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth10" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px; padding-bottom: 15px;">
                                                        <asp:Label ID="lblMonth11" runat="server" Text=""></asp:Label>
                                                        <asp:CheckBox ID="chkMonth11" runat="server" />
                                                    </td>
                                                    <td align="right" style="padding-top: 5px; padding-bottom: 15px;">
                                                    <asp:Label ID="lblMonth12" runat="server" Text=""></asp:Label>
                                                    <asp:CheckBox ID="chkMonth12" runat="server" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    
                                    <tr valign="top">
                                        <td align="left" colspan="3" valign="top" bgcolor="#7DA5E0" 
                                            style="padding: 5px; color: #FFFFFF; font-weight: bold;font-family: 'Segoe UI'; font-size: 13px">
                                            ขั้นตอนที่ 3 : กำหนดเป้าหมายในแต่ละช่วงระยะเวลาที่ดำเนินการ
                                        </td>
                                    </tr>

                                    <tr valign="top">
                                        <td align="center" colspan="3" style="padding-top: 5px; padding-bottom:15px;">
                                            <br />
                                            <asp:Panel ID="PanelFlexibleControl_t5" runat="server" Width="100%">

                                            </asp:Panel>
                                          
                                            <table>
                                                <tr>
                                                    <td align="right">
                                                        <asp:LinkButton ID="btnAddControl_t5" runat="server" CssClass="defaultFont" onclick="btnAddControl_t5_Click">เพิ่มเป้าหมายใหม่</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    
                                    <tr valign="top">
                                        <td align="left" colspan="3" valign="top" bgcolor="#7DA5E0" 
                                            style="padding: 5px; color: #FFFFFF; font-weight: bold;font-family: 'Segoe UI'; font-size: 13px">
                                            ขั้นตอนที่ 4 : กดปุ่มเพื่อบันทึกการเปลี่ยนแปลงหรือยกเลิก
                                        </td>
                                    </tr>
                                    
                                    <tr valign="top">
                                        <td align="center" colspan="3" style="padding-top: 10px; padding-bottom: 15px;">
                                            <asp:Button ID="btnSave_t5" runat="server" onclick="btnSave_t5_Click" Text="บันทึก" ValidationGroup="t5" />
                                            <asp:Button ID="btnEdit_t5" runat="server" onclick="btnEdit_t5_Click" Text="บันทึกการเปลี่ยนแปลง" ValidationGroup="t5" Visible="False" />&#160; 
                                            <asp:Button ID="btnCancel_t5" runat="server" CausesValidation="False" onclick="btnCancel_t5_Click" Text="ยกเลิก" />
                                        </td>
                                    </tr>
                                    
                                </table>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
                </asp:Panel>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
